package com.pty.demo.behaviour.state;

/**
 * @author pengty
 * @date 2020/3/13
 */
public class OrderStateContext {

    private OrderState currentState;

    public OrderState getCurrentState() {
        return currentState;
    }

    public void setCurrentState(OrderState currentState) {
        this.currentState = currentState;
    }

    public void pay() {
        this.currentState.pay();
    }

    public void checkPay() {
        this.currentState.checkPay();
    }

    public void deliver() {
        this.currentState.deliver();
    }

    public void receive() {
        this.currentState.receive();
    }
}
